/**
 * Copyright By Nanjing Fujitsu Nanda Software Technology Co., Ltd
 * 上午10:20:53
 * CoreCustomerService.java
 * 
 */
package com.fujitsu.nanjing.mobile.service;

import com.fujitsu.nanjing.mobile.dao.CoreCustomerDao;
import com.fujitsu.nanjing.mobile.model.hibernate.CoreCustomer;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

import javax.annotation.Resource;

/**
 * @author qixb.fnst
 * 
 */
@Service
@Transactional
public class CoreCustomerService implements BaseService<CoreCustomer> {
    @Resource
    private CoreCustomerDao coreCustomerDao;

    @Override
    public CoreCustomer find(int id) {
        return coreCustomerDao.query(CoreCustomer.class, id);
    }

    @Override
    public CoreCustomer modify(CoreCustomer t) {
        return coreCustomerDao.update(t);
    }

    @Override
    public void delete(CoreCustomer t) {
         coreCustomerDao.delete(t);

    }

    @Override
    public CoreCustomer add(CoreCustomer t) {
        return coreCustomerDao.insert(t);
    }

    @Override
    public List<CoreCustomer> find(String queryString) {
        return coreCustomerDao.query(queryString);
    }

}
